<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>订单详情 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/member_center.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/order.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<script>
$().ready( function() {
    $(".show_time").each(function() {
	try
    {
    	time_show($(this).attr('id'),null);
    }
    catch(e)
    {
    alert(e);
    }
	});
    $('.modalWindow').each(function(i){
    	$this = $(this);
		var trigger = $this.metadata().trigger;// showRegisterWindow激活元素
    	var closeClass = $this.metadata().closeClass;//registerWindowClose 关闭按钮
    	var formId = $this.metadata().formId;//registerWindowForm
	    $this.jqm({
			modal: true,// 是否开启模态窗口
			overlay: 30,// 屏蔽层透明度
			trigger: "."+trigger,// showRegisterWindow激活元素
			closeClass: closeClass,//registerWindowClose 关闭按钮
			onHide: function(hash) {
				$("#"+formId).resetForm();
	    		hash.o.remove();
	    		hash.w.fadeOut();
	    	},
	    	onShow: function(hash){
	    		hash.w.fadeIn();
		    }
		}).jqDrag(".windowTop");
	 });
});
    
    
function time_show(eleId,seconds)
{
	if(seconds==null)
	{
		var obj = $('#'+eleId).metadata();
		seconds = obj.remainTime;
	}
  if (seconds > 0) { 
   seconds = seconds - 1; 
   var second = Math.floor(seconds % 60);             // 计算秒     
   var minite = Math.floor((seconds / 60) % 60);      //计算分 
   var hour = Math.floor((seconds / 3600) % 24);      //计算小时 
   var day = Math.floor((seconds / 3600) / 24);        //计算天 

   $("#"+$('#'+eleId).metadata().showTime).html(day + "天" + hour + "小时" + minite + "分" + second + "秒"); 
   window.setTimeout("time_show('"+eleId+"',"+ seconds +")", 1000); //间隔函数，1秒执行 
  } 
}
</script>
</head>
<body class="memberCenter">
	<#include "/WEB-INF/template/shop/header.ftl">
	<div class="body orderList">
		<div class="bodyLeft">
			<#include "/WEB-INF/template/shop/member_center_left.ftl">
		</div>
		<div class="bodyRight">
			<div class="memberCenterDetail">
				<div class="top">订单详情[${order.orderSn}]</div>
				<div class="middle">
                    <#if order.orderStatus != 'closed'>
						<div class="order_status">
							<div class="desc">
								<div <#if order.orderStatus == 'unprocessed'> class="step_checked" <#else> class="step_unchecked" </#if>>
									提交订单
								</div>
								<div <#if order.orderStatus == 'processed' && order.shippingStatus=='unshipped' && order.paymentStatus=='paid'> class="step_checked" <#else> class="step_unchecked" </#if>>
									已支付
								</div>
								<div <#if order.orderStatus == 'processed' && order.shippingStatus=='shipped'> class="step_checked" <#else> class="step_unchecked" </#if>>
									已发货
								</div>
								<div <#if order.orderStatus == 'processed' && order.shippingStatus=='confirmed'> class="step_checked" <#else> class="step_unchecked" </#if>>
									已收货
								</div>
								<div <#if order.orderStatus == 'commented'> class="step_checked" <#else> class="step_unchecked" </#if>>
									订单完成
								</div>
							</div>
							<div class="seq">
								<div <#if order.orderStatus == 'unprocessed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>1</label>
								</div>
								<div <#if order.orderStatus == 'processed' && order.shippingStatus=='unshipped' && order.paymentStatus=='paid'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>2</label>
								</div>
								<div <#if order.orderStatus == 'processed' && order.shippingStatus=='shipped'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>3</label>
								</div>
								<div <#if order.orderStatus == 'processed' && order.shippingStatus=='confirmed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<div>4</div>
								</div>
								<div <#if order.orderStatus == 'commented'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>5</label>
								</div>
							</div>
						</div>
	                    <div class="blank"></div>
					<div class="operationInfo">
						<strong class="green">订单状态 [订单编号：${order.orderSn}]</strong>
                    	
                        <#if (order.payTime?exists) >
                            <font color="red">订单支付剩余时间：</font><span id="order_${order.orderSn}" class="show_time {showTime:'order_${order.orderSn}',remainTime:${order.payTime}}" ></span>
                        </#if>
                        <#if (order.receiveTime?exists) >
                            <font color="red">确认收货剩余时间：</font><span id="order_${order.orderSn}" class="show_time {showTime:'order_${order.orderSn}',remainTime:${order.receiveTime}}" ></span>
                        </#if>
                        <div class="blank"></div>
                        <#if order.orderStatus != "completed" && order.orderStatus != "invalid">
							<#if order.paymentConfig != null>
								<#if order.paymentStatus == "unpaid">
                                    <input type="button" class="formButton process_payBtn" value="立即支付" />
								<#elseif order.orderStatus == 'processed' && order.paymentStatus == "paid" && order.shippingStatus=='unshipped' && order.refundSet?size < 1 >
                                    <input type="button" class="formButton process_refundBtn" value="申请退款" />
								<#elseif order.orderStatus == 'processed' && order.paymentStatus == "paid" && order.shippingStatus=='unshipped' && order.refundSet?size = 1 >
                                        已申请退款：
                                    <#list order.refundSet as list>
                                        ${list.refundStatusDesc}
                                    </#list>
								<#elseif order.orderStatus == 'processed' && order.shippingStatus=='shipped'>
                                    <input type="button" class="formButton process_confirmBtn" value="确认收货" />
                                    <input type="button" class="formButton process_refundBtn" value="申请退款" />
                                    <input type="button" class="formButton process_shippingBtn" value="物流信息" onclick="document.getElementById('BAPPIframeCanvas101074136581819331816').getElementById('postid').value='2323232'" />
								<#elseif order.orderStatus == 'processed' && order.shippingStatus=='confirmed'>
									<form action="order!comment.action" method="post">
										<@s.token />
										<input type="hidden" name="id" value="${order.id}" />
										<input type="submit" class="formButton" value="评论" />
									</form>
								</#if>
							</#if>
						</#if>
					</div>
                    <#else>
                        <div class="operationInfo">
                            <h3>当前订单状态：交易关闭</h3>
						</div>
                    </#if>
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<th colspan="2">收货信息</th>
						</tr>
						<tr>
							<td class="title">收货人：</td>
							<td>${order.shipName}</td>
						</tr>
						<tr>
							<td class="title">收货地区：</td>
							<td>${order.shipArea}</td>
						</tr>
						<tr>
							<td class="title">收货地址：</td>
							<td>${order.shipAddress}</td>
						</tr>
						<tr>
							<td class="title">邮编：</td>
							<td>${order.shipZipCode}</td>
						</tr>
						<tr>
							<td class="title">电话：</td>
							<td>${order.shipPhone}</td>
						</tr>
						<tr>
							<td class="title">手机：</td>
							<td>${order.shipMobile}</td>
						</tr>
						<tr>
							<td class="title">附言：</td>
							<td colspan="1">${order.memo}</td>
						</tr>
					</table>
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<th colspan="2">支付信息</th>
						</tr>
						<tr>
							<td class="title">配送方式：</td>
							<td>${order.deliveryTypeName}</td>
						</tr>
						<tr>
							<td class="title">支付方式：</td>
							<td>${order.paymentConfigName}</td>
						</tr>
						<tr>
							<td class="title">商品重量：</td>
							<td>${order.productWeight} ${action.getText("WeightUnit." + order.productWeightUnit)}</td>
						</tr>
						<tr>
							<td class="title">配送费用：</td>
							<td><span class="red">${order.deliveryFee?string(orderUnitCurrencyFormat)}</span></td>
						</tr>
					</table>
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<th>商品名称</th>
							<th>购买价格</th>
							<th>购买数量</th>
							<th>小计</th>
						</tr>
						<#list order.orderItemSet as list>
							<tr>
								<td>
									<a href="${base}${list.productHtmlFilePath}" target="_blank">
                                        <img src="${base}${(list.productitem.product.productImageList[0].thumbnailProductImagePath)!systemConfig.defaultThumbnailProductImagePath}" style="width:60px;height:60px;" />
										<br />
									${list.productName}
                                        <#if (list.productitem.color != null && list.productitem.propertiesValue != null)>
							    					[颜色:${(list.productitem.color.name)!},尺寸:${(list.productitem.propertiesValue.lable)!}]
							    			<#elseif (list.productitem.color != null && list.productitem.propertiesValue == null)>
							    					[颜色:${(list.productitem.color.name)!}]
							    			<#elseif (list.productitem.propertiesValue != null)>
							    					[尺寸:${(list.productitem.propertiesValue.lable)!}]
							    			</#if>
                                    </a>
									
								</td>
								<td>
									${list.productPrice?string(priceCurrencyFormat)}
								</td>
								<td>
									${list.productQuantity}
								</td>
								<td>
									<span class="subtotalPrice">${list.subtotalPrice?string(orderCurrencyFormat)}</span>
								</td>
							</tr>
						</#list>
						<tr>
							<td class="info" colspan="4">
								商品总金额：<span class="red">${order.productTotalPrice?string(orderUnitCurrencyFormat)}</span>&nbsp;&nbsp;&nbsp;&nbsp;
								配送费用：<span class="red">${order.deliveryFee?string(orderUnitCurrencyFormat)!}</span>&nbsp;&nbsp;&nbsp;&nbsp;
								支付手续费：<span class="red">${order.paymentFee?string(orderUnitCurrencyFormat)!}</span>&nbsp;&nbsp;&nbsp;&nbsp;
								订单总金额：<span class="red">${order.totalAmount?string(orderUnitCurrencyFormat)}</span>
							</td>
						</tr>
					</table>
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<th colspan="5">订单日志</th>
						</tr>
						<tr>
							<th>序号</th>
							<th>日志类型</th>
							<th>日志信息</th>
							<th>操作时间</th>
							<th>操作人</th>
						</tr>
						<#list order.orderLogSet as list>
							<tr>
								<td>${list_index + 1}</td>
								<td>${action.getText("OrderLogType." + list.orderLogType)}</td>
								<td>${list.info!"-"}</td>
								<td>${list.createDate?string("yyyy-MM-dd HH:mm:ss")}</td>
								<td>${list.operator!"-"}</td>
							</tr>
						</#list>
					</table>
					<div class="blank"></div>
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		<div class="blank"></div>
		<#include "/WEB-INF/template/shop/friend_link.ftl">
	</div>
	<div class="blank"></div>
	<#include "/WEB-INF/template/shop/footer.ftl">
       
        
        
    <div class="registerWindow modalWindow {trigger:'process_payBtn',closeClass:'process_payClose',formId:'process_pay'}" style="padding:4px;padding-right:10px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">订单处理--付款信息</div>
            <a class="windowClose process_payClose" href="#" hidefocus="true"></a>
        </div>
        <div class="windowMiddle">
             <form action="payment!confirm.action" method="post">
				<input type="hidden" name="paymentType" value="online" />
				<input type="hidden" name="order.id" value="${order.id}" />
				<input type="submit" class="formButton" value="立即支付" />
                <div id="shipping">
                </div>
			</form>
        </div>
    	<div class="windowBottom"></div>
   </div> 
       
    <div class="registerWindow modalWindow {trigger:'process_confirmBtn',closeClass:'process_confirmClose',formId:'process_confirm'}" style="padding:4px;padding-right:10px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">订单处理--确认收货</div>
            <a class="windowClose process_confirmClose" href="#" hidefocus="true"></a>
        </div>
        <div class="windowMiddle">
             <form id="process_confirm" action="order!confirm.action" method="post" >
                 <@s.token />
				<input type="hidden" name="id" value="${order.id}" />
                 <div class="blank"></div>
                <center><input type="submit" class="formButton" value="确认收货" /></center>
             </form> 
            
        </div>
    	<div class="windowBottom"></div>
   </div>
       
    <div class="registerWindow modalWindow {trigger:'process_refundBtn',closeClass:'process_refundClose',formId:'process_refund'}" style="padding:4px;padding-right:10px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">订单处理--申请退款</div>
            <a class="windowClose process_refundClose" href="#" hidefocus="true"></a>
        </div>
        <div class="windowMiddle">
            <form id="process_refund" action="refund!add.action" method="post">
				<input type="hidden" name="refund.order.id" value="${order.id}" />
                <input type="hidden" name="refund.order.orderSn" value="${order.orderSn}" />
				<input type="submit" class="formButton" value="申请退款" />
			</form>
        </div>
    	<div class="windowBottom"></div>
   </div>
    
    
       
    <div class="registerWindow modalWindow {trigger:'process_shippingBtn',closeClass:'process_shippingClose',formId:'process_refund'}" style="padding:40px;padding-right:10px;width:800px;height:600px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">订单处理--查看物流</div>
            <a class="windowClose process_shippingClose" href="#" hidefocus="true"></a>
        </div>
        <!--
        
        style="background-color: transparent; height: 418px;"
        allowtransparency="true" 
        scrolling="no" 
        -->
        <div class="windowMiddle">
            <iframe id="BAPPIframeCanvas101074136581819331816" frameborder="0" width="100%" scrolling="no" style="height: 418px;" src="http://baidu.kuaidi100.com/index2.html?bd_user=0&amp;bd_sig=7215b099855fb4735a9f1b5d6f286fd7&amp;canvas_pos=search&amp;bd_param=innertype%3Dkuaidi100&amp;s_param=innertype%3Dkuaidi100&amp;keyword=%E5%BF%AB%E9%80%92" name="BAPPIframeCanvas101074136581819331816"></iframe>
        </div>
    	<div class="windowBottom"></div>
   </div>
</body>
</html>